from datetime import datetime
import pytz

def local_string_to_utc(local_time_str, local_tz='Asia/Shanghai'):
    """
    将本地时间字符串转换为UTC时间
    :param local_time_str: 格式如 '2025-06-24 10:00'
    :param local_tz: 本地时区，默认中国时区
    :return: UTC时间的datetime对象
    """
    # 解析本地时间字符串
    local_dt = datetime.strptime(local_time_str, '%Y-%m-%d %H:%M')
    
    # 设置本地时区
    local_timezone = pytz.timezone(local_tz)
    local_dt = local_timezone.localize(local_dt)
    
    # 转换为UTC
    utc_dt = local_dt.astimezone(pytz.UTC)
    
    return utc_dt